/*============================================================================*/
/*  Copyright (C) 2009-2014, iSOFT INFRASTRUCTURE SOFTWARE CO.,LTD.
 *  
 *  All rights reserved. This software is iSOFT property. Duplication 
 *  or disclosure without iSOFT written authorization is prohibited.
 *  
 *  @file       <SchM.h>
 *  @brief      <>
 *  
 *  <MCU:TC1782>
 *  
 *  @author     <>
 *  @date       <2015-09-22 14:42:05>
 */
/*============================================================================*/


#ifndef SCHM_H
#define SCHM_H

/*=======[R E V I S I O N   H I S T O R Y]====================================*/
/*  <VERSION>    <DATE>    <AUTHOR>    <REVISION LOG>
 *  V1.0.0            20150410    Coco.Zhang   Initial version
 *============================================================================*/

/*=======[V E R S I O N  I N F O R M A T I O N]===============================*/

#define SCHM_H_AR_MAJOR_VERSION  3U
#define SCHM_H_AR_MINOR_VERSION  1U
#define SCHM_H_AR_PATCH_VERSION  5U
#define SCHM_H_SW_MAJOR_VERSION  1U
#define SCHM_H_SW_MINOR_VERSION  0U
#define SCHM_H_SW_PATCH_VERSION  0U


/*=======[I N C L U D E S]====================================================*/
#include "Std_Types.h"


/*=======[M A C R O S]========================================================*/



/*=======[T Y P E   D E F I N I T I O N S]====================================*/



/*=======[E X T E R N A L   F U N C T I O N   D E C L A R A T I O N S]========*/
/*************************************************************************/
/*
 * Brief               Init SchM module
 * ServiceId           0x00 
 * Sync/Async          Synchronous
 * Reentrancy          Non Reentrant
 * Param-Name[in]      None
 * Param-Name[out]     None
 * Param-Name[in/out]  None
 * Return              None
 * PreCondition        None
 * CallByAPI           EcuM
 */
/*************************************************************************/
extern void  SchM_Init (void) ;

/*************************************************************************/
/*
 * Brief               Deinit SchM module
 * ServiceId           0x01 
 * Sync/Async          Synchronous
 * Reentrancy          Non Reentrant
 * Param-Name[in]      None
 * Param-Name[out]     None
 * Param-Name[in/out]  None
 * Return              None
 * PreCondition        None
 * CallByAPI           EcuM
 */
/*************************************************************************/
extern void SchM_Deinit(void);

#if(STD_ON == SchM_VERSION_INFO_API)
/******************************************************************************/
/*
 * Brief               This function returns the version information of this module
 * ServiceId           0x02
 * Sync/Async          Synchronous
 * Reentrancy          Non Reentrant
 * Param-Name[in]      None
 * Param-Name[out]     versioninfo-pointer to location to store version information
 * Param-Name[in/out]  None
 * Return              None
 * PreCondition        None
 * CallByAPI           None
 */
/******************************************************************************/
#if(STD_ON == SCHM_DEV_ERROR_DETECT)
#define SchM_GetVersionInfo(versionInfo) \
    do{ \
        if (NULL_PTR == (versionInfo))\
        { \
            Det_ReportError(SCHM_MODULE_ID, SCHM_INSTANCE,  \
                    SCHM_GETVERSIONINFO_ID, SCHM_E_PARAM_POINTER);\
        }\
        else\
        {\
            ((Std_VersionInfoType *)(versionInfo))->vendorID   = SCHM_VENDOR_ID; \
            ((Std_VersionInfoType *)(versionInfo))->moduleID   = SCHM_MODULE_ID; \
            ((Std_VersionInfoType *)(versionInfo))->instanceID = SCHM_INSTANCE;  \
            ((Std_VersionInfoType *)(versionInfo))->sw_major_version = SCHM_SW_MAJOR_VERSION; \
            ((Std_VersionInfoType *)(versionInfo))->sw_minor_version = SCHM_SW_MINOR_VERSION; \
            ((Std_VersionInfoType *)(versionInfo))->sw_patch_version = SCHM_SW_PATCH_VERSION; \
        }\
    }while(0)
#else
#define SchM_GetVersionInfo(versionInfo) \
    do{ \
        ((Std_VersionInfoType *)(versionInfo))->vendorID   = SCHM_VENDOR_ID; \
        ((Std_VersionInfoType *)(versionInfo))->moduleID   = SCHM_MODULE_ID; \
        ((Std_VersionInfoType *)(versionInfo))->instanceID = SCHM_INSTANCE;  \
        ((Std_VersionInfoType *)(versionInfo))->sw_major_version = SCHM_SW_MAJOR_VERSION; \
        ((Std_VersionInfoType *)(versionInfo))->sw_minor_version = SCHM_SW_MINOR_VERSION; \
        ((Std_VersionInfoType *)(versionInfo))->sw_patch_version = SCHM_SW_PATCH_VERSION; \
    }while(0)
#endif /* STD_ON == SCHM_DEV_ERROR_DETECT */

#endif /* STD_ON == SCHM_VERSION_INFO_API */

#endif/* #ifndef  SCHM_H */
